package com.lzq.model;


import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion;

import java.io.Serializable;

/**
 * @author 2019/1/31 10:15 by 刘赵强
 * 只序列化值不为空的
 **/
@JsonSerialize(
        include = Inclusion.NON_NULL
)
public class ResultBean<T> implements Serializable {
    private static final long serialVersionUID = -1724546458368592165L;
    private String returnCode = "0000";
    private String returnMessage = "请求成功";
    private T model;
    private Integer dataCount;
    private int effectNum;

    public ResultBean(String returnCode,T model) {
        this.returnCode = returnCode;
        this.model = model;
    }

    public String getReturnCode() {
        return returnCode;
    }

    public void setReturnCode(String returnCode) {
        this.returnCode = returnCode;
    }

    public String getReturnMessage() {
        return returnMessage;
    }

    public void setReturnMessage(String returnMessage) {
        this.returnMessage = returnMessage;
    }

    public T getModel() {
        return model;
    }

    public void setModel(T model) {
        this.model = model;
    }

    public Integer getDataCount() {
        return dataCount;
    }

    public void setDataCount(Integer dataCount) {
        this.dataCount = dataCount;
    }

    public int getEffectNum() {
        return effectNum;
    }

    public void setEffectNum(int effectNum) {
        this.effectNum = effectNum;
    }
}

